package generation.aggregation;

import org.jfugue.StreamingPlayer;

public class TempoMarker extends Thread {

	private StreamingPlayer player;
	private boolean interrupted;
	
	@Override
	public void run() {
		while(!interrupted){
			try {
				if(player != null){
					player.close();
				}
				player = new StreamingPlayer();
				player.stream(PatternInformer.getInformation());
				sleep(2000);
			} catch (InterruptedException e) {
				e.printStackTrace();
			}
		}
	}

	public boolean isInterrupted() {
		return interrupted;
	}

	public void setInterrupted(boolean interrupted) {
		this.interrupted = interrupted;
	}
	
}
